package com.lkd.feign.fallback;
import com.google.common.collect.Lists;
import com.lkd.feign.OrderService;
import com.lkd.feign.VMService;
import com.lkd.http.view.RequestPayVO;
import com.lkd.vo.SkuVO;
import com.lkd.vo.VmVO;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
@Slf4j
public class OrderServiceFallbackFactory implements FallbackFactory<OrderService> {
    @Override
    public OrderService create(Throwable throwable) {
        log.error("调用订单服务失败",throwable);
       return new OrderService() {
           @Override
           public Map requestPay(RequestPayVO vo) {
               return null;
           }
       };
    }
}
